<table style="width: 100%;" cellpadding="4" cellspacing="0">
<tr>
    <td class="border2">
        <table style="width: 100%;" class="mainmenu5" cellpadding="0" cellspacing="0" border="0">
            <tr>
            <td width="7"><img src="design/pic/spacer.gif" class="sqr1" alt="" height="7" width="7" /></td>
            <td class="block_header">{language text="group_forum"}</td>
            </tr>
        </table>

{if $iCnt > 0}

	<table style="width:100%;" cellpadding="0" cellspacing="0">
	<tr>
	<td style="width:90%;font-size:9pt;" class="color">
		<div style="padding:4px;font-size:8pt;text-align:right;">
			<a class="link_action" href="{url link='public.groups.forum' id=$iGroupId}">[ {language text="view_all_topics"} ]</a>
			<a class="link_action" href="{url link='public.groups.forum.topic' id=$iGroupId}">[ {language text="post_a_new_topic"} ]</a>
		</div>

		<table style="width:100%;" class="forum-1" cellpadding="5" cellspacing="1">
		<tr>
			<td style="width:10%;text-align:center;"><img src="design/pic/spacer.gif" alt="" width="40" height="2" /></td>
			<td style="width:50%;font-size:8pt;"><span style="vertical-align:middle;"><b>{language text="topics"}</b></span></td>
			<td style="width:10%;text-align:center;font-size:8pt;"><span style="vertical-align:middle;"><b>{language text="replies"}</b></span></td>
			<td style="width:10%;text-align:center;font-size:8pt;"><span style="vertical-align:middle;"><b>{language text="views_543"}</b></span></td>
			<td style="width:30%;text-align:center;font-size:8pt;"><span style="vertical-align:middle;"><b>{language text="last_reply"}</b></span></td>
		</tr>
		</table>

		<table style="width:100%;" class="forum-2" cellpadding="5" cellspacing="1">
		{foreach from=$aTopics item=aItem}
		<tr>
			<td style="width:10%;text-align:center;" class="forum-3"><a href="{url link='public.user' name=$aItem.user}">{Account::Avatar sUser=$aItem.user iSize=60 class="pic1" onmouseover="showInfo5('`$aItem.user`', '', '');this.className='pic2';" onmouseout="this.className='pic1';return nd();"}</a></td>
		    <td style="width:50%;font-size:8pt;" class="forum-3">
			<div style="font-size:10pt;"><a href="{url link='public.groups.forum.posts' id=$aItem.id}">{$aItem.title|strip_tags|process_code|default|escape}</a></div>
			<div style="padding:5px;">
				{language text="posted_by_604"}: <a href="{url link='public.user' name=$aItem.user}">{$aItem.user}</a> on {$aItem.time|date_format:$sMonthDateFormat}
			</div></td>
		    <td style="width:10%;text-align:center;font-size:8pt;" class="forum-3">{$aItem.count_replies}</td>
		    <td style="width:10%;text-align:center;font-size:8pt;" class="forum-3">{$aItem.views}</td>
		    <td style="width:30%;text-align:center;font-size:8pt;" class="forum-3">
			{if $aItem.count_replies}

		    	{$aItem.last_time|date_format:$sMonthDateFormatDot}
			    <div><a href="{url link='public.user' name=$aItem.last_user}">{$aItem.last_user}</a></div>
			    {else}
		        	{language text="no_replies"}
		    	{/if}
			</td>
		</tr>
		{/foreach}
		</table>

		<table style="width:100%;" class="forum-1" cellpadding="5" cellspacing="1">
		<tr>
			<td style="font-size:8pt;">{$sForumCurrentTime|date_format:$sMonthDateFormat}</td>
		</tr>
		</table>
	</td>
	</tr>
	</table>
{else}
<div class="message_info">
  {language text="there_are_no_topics_yet"}
</div>
<a class="link_action" href="{url link='public.groups.forum.topic' id=$iGroupId}">[ {language text="post_now"} ]</a>
{/if}
    </td>
</tr>
</table>